{include file="index/header" /}
<body>
	<div class="panel admin-panel">
		<form method="get" action="" id="listform">
			<div class="panel-head"><strong class="icon-reorder"> 问题列表</strong> </div>
			<div class="padding border-bottom">
				<ul class="search" style="padding-left:10px;">
					<li>搜索：</li>
					<li>
						<select name="nav_id" class="input" style="width:150px; line-height:17px;" onchange="changeNav()"  id="nav">
							<option value="">请选择课程</option>
							{foreach name='nav_data' item='nav'}
							<option value="{$nav.nav_id}" {if $nav.nav_id eq $param.nav_id}selected=""{/if}>{$nav.nav_name}</option>
							{/foreach}
						</select>
					</li>
					<li>
						<input type="search" placeholder="关键词" name="kw" value="{$param.kw}" class="input" style="width:250px; line-height:17px;display:inline-block;"/>
					</li>
					<a href="javascript:void(0)" class="button border-main" onclick="changeNav()">搜索</a>
				</ul>
			</div>
			<table class="table table-hover text-center">
				<tr>
					<th>ID</th>
					<th>用户</th>
					<th style="text-align:left;">课程</th>
					<th>时间</th>
					<th>是否已回答</th>
					<th>操作</th>
				</tr>
				{foreach name='data' item='v'}
				<tr>
					<td>{$v.id}</td>
					<td>{$v.know_nickname}/{$v.know_phone}</td>
					<td align="left">{$v.nav_name}<br/>{$v.type_name}<br/>{$v.s_name}<br/>{$v.course_name}</td>
					<td>{$v.time}</td>
					<td>{$v.answer ? '是' : '<font color="#f00">否</font>'}</td>
					<td><div class="button-group"><a class="button border-main" href="{:url('answer',['id' => $v['pid'] ?: $v['id'],'page'=>$param['page'],'kw'=>$param['kw']])}"><span class="icon-edit"></span>点评</a></div></td>
				</tr>
				{/foreach}
				<tr>
					<td colspan="7">{$data->render()}</td>
				</tr>
			</table>
		</form>
	</div>
</body></html>
<script>
	function changeNav(){
		$("#listform").submit();
	}
</script>